The so called 8B/10B code is one type of encoding for serial data transmission which has become standard for several high data rate applications to provide a maximum number of binary data transitions in order to maintain clock synchronization while at the same time maintaining a DC balance regardless of the incoming data pattern. DC balance means that the time averaged coded transmission is free of a dc level. DC balance simplifies transmitter and receiver design and improves precision of the system.
The 8B/10B code and equipment therefore accomplishes these objectives and are described in an article by Widmer et al entitled, "A DC-Balanced Partitioned-Block, 8B/10B Transmission Code," IBM Journal of Research and Development, Volume 27, 1983, pages 440-451.
Current 8B/10B transmitters are built with eight bit wide architecture. In fact the 8B/10B code and 8B/10B transmitter and receiver apparatus were particularly designed, as set forth by Widmer et al in the above mentioned article, for application with eight bit wide architecture. The Widmer approach codes an 8 bit raw data byte into 10 bits of encoded data by dividing said 8 bit wide data into two packets or nibbles, the first nibble being 5 bits and the second nibble being 3 bits. The 5 bit nibbles are fed to the 5B/6B encoder where they are encoded into 6 bit code and the 3 bit nibbles are sent to the 3B/4B encoder where they are encoded into a 4 bit code. From these encoders, both of the encoded nibbles are loaded into a single register and the 10 bit code packet is serially transmitted.
The 8B/10B code based systems have been highly successful. However, there are certain applications where 10 bit wide raw data is presented, notably video signal transmissions. In these instances, it is advantageous if the 10 bit byte can be handled as a packet.
In order to accomplish the benefits of our invention it was advantageous for us to provide special command codes which also comply with the criteria and rules of 8B/10B encodement. Accordingly, it is necessary to have an understanding of the concept of disparity and running disparity which are employed in the 8B/10B coding to understand the derivation of the special codes which we have added to the 8B/10B code in order to support its use in connection with 10 bit wide architecture.
As mentioned above, 8B/10B coding of an 8 bit byte is carried out in two nibbles, a 5 bit nibble and a 3 bit nibble. The 5 bit nibble is encoded to 6 bits and the 3 bit nibble is encoded to 4 bits. The 8B/10B coding is set forth in Table 1 and 2 as given below by Widmer. All the possible 5 bit data values are listed in column "ABCDE" and their corresponding valid 6 bit 5B/6B codes are listing in column labeled "abcdei" and in the column labeled "ALTERNATE." If the quantity called "running disparity" has a positive value immediately before the instant that the encoding of a particular raw data byte is to commence, then, the valid encoded data for that particular byte must be selected from the column of the Table which will not change the running disparity or will decrease it.
The term "running disparity" means the sum of the disparity of all previous blocks, where disparity is the difference between the number of ones and the number of zeroes in a block and is positive when the number of ones are greater. For any given nibble of 8B/10B coded data, the allowed disparity can be either +2, -2, or 0. With reference to Table 1, note that under column abcdei that each code in that column is selected so that the number of ones and zeroes in the code are either equal or differ by two. Also note that whenever a "+" appears in column D-1, that the number of zeroes exceeds the number of ones by two in the corresponding column "abcdei." Also note that whenever a "+" or "-" appear in the column D-1, that the complement code appears in the column ALTERNATE. This means that if the running disparity is "+", then the valid code for the next nibble should have more zeroes. Hence, the valid data must have a disparity of -2. If a "d" appears in column D-1, then the disparity is zero and the encoded form can be used with either value of prior running disparity.
The same characteristics apply for the 3B/4B encoding as shown in Table 2.
Using the 8B/10B codes of Tables 1 and 2, it is convenient to sum the disparity, i.e., +2, -2, or 0, for all codes sent to form the "running disparity" and if the running disparity is "+", to arrange the logic so that the disparity for the next coded nibble is negative. If the code indicated in column abcdei has a "+" preceding it, then it would be valid for the next coded nibble. However, if the code preceding the column abcdei is negative, then the code in the ALTERNATE column would need to be used. This would assure that the running disparity either flips back and forth from +1 to -1, or remains unchanged at -1 or +1 after each coded nibble is sent on.
TABLE 1 ______________________________________ 5B/6B ENCODING abcdei NAME ABCDE K D-1 abcdei DI ALTERNATE ______________________________________ D.0 00000 0 + 011000 - 100111 D.1 10000 0 + 100010 - 011101 D.2 01000 0 + 010010 - 101101 D.3 11000 0 d 110001 0 D.4 00100 0 + 001010 - 110101 D.5 10100 0 d 101001 0 D.6 01100 0 d 011001 0 D.7 11100 0 - 111000 0 000111 D.8 00010 0 + 000110 - 111001 D.9 10010 0 d 100101 0 D.10 01010 0 d 010101 0 D.11 11010 0 d 110100 0 D.12 00110 0 d 001101 0 D.13 10110 0 d 101100 0 D.14 01110 0 d 011100 0 D.15 11110 0 + 101000 - 010111 D.16 00001 0 - 011011 + 100100 D.17 10001 0 d 100011 0 D.18 01001 0 d 010011 0 D.19 11001 0 d 110010 0 D.20 00101 0 d 001011 0 D.21 10101 0 d 101010 0 D.22 01101 0 d 011010 0 D/K.23 11101 x - 111010 + 000101 D.24 00011 0 + 001100 - 110011 D.25 10011 0 d 100110 0 D.26 01011 0 d 010110 0 D/K.27 11011 x - 110110 + 001001 D.28 00111 0 d 001110 0 K.28 00111. 1 - 001111 + 110000 D/K.29 10111 x - 101110 + 010001 D/K.30 01111 x - 011110 + 100001 D.31 11111 0 - 101011 + 010100 ______________________________________
TABLE 2 ______________________________________ 3B/4B ENCODING fghj NAME FGH K D-1 fghj DI ALTERNATE ______________________________________ D/K.x.0 000 x + 0100 - 1011 D.x.1 100 0 d 1001 0 D.x.2 010 0 d 0101 0 D/K.x.3 110 x - 1100 0 0011 D/K.x.4 001 x + 0010 - 1101 D.x.5 101 0 d 1010 0 D.x.6 011 0 d 0110 0 D.x.P7 111 0 - 1110 + 0001 D/K.y.A7 111 x - 0111 + 1000 K.28.1 100 1 + 1001 0 0110 K.28.2 010 1 + 0101 0 1010 K.28.5 101 1 + 1010 0 0101 K.28.6 011 1 + 0110 0 1001 ______________________________________ Note: K.x Restricted to K.28 K.y Restricted to K.23, K.27, K.28, K.29, K.30